﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication9
{
    public partial class Form1 : Form
    {
        Studentform stu = new Studentform();
        public Form1()
        {
            InitializeComponent();
        }

        private void btnSubmit_Click(object sender, EventArgs e)
        {
            stu.MId = Convert.ToInt32(txtid.Text);
            stu.MName  = txtname.Text;
            int id = stu.MId;
            string name = stu.MName;
            MessageBox.Show("Id :"+id+" Name: "+name);
        }
    }
}
